layui.use(['element', 'table', 'jquery'], function () {
    var element = layui.element, $ = layui.jquery;
    $('.layui-btn').on('click', function () {
        //获取按钮中data-type属性的值，
        var type = $(this).data('type');
        active[type] ? active[type].call(this) : '';
    });
});